﻿package gb
{
	import flash.display.MovieClip;
	public class GameObject extends MovieClip
	{
		protected var physicalCore:PhysicalCore;
		/*protected var topLeft:Number;

		public function scrollDistance(distance:Number)
		{
			this.topLeft += distance;
			this.x += distance;
		}*/

		public function GameObject()
		{
			// constructor code
			this.physicalCore = new PhysicalCore(this);
		}

		public function SetPosition(nX:Number,nY:Number)
		{
			this.physicalCore.x = nX;
			this.physicalCore.y = nY;
		}

		public function SetPicth(n:Number)
		{
			this.physicalCore.pitch = n;
		}

		public final function UpdateObject()
		{
			if (physicalCore.Update())
			{
				FloorContact();
			}
			Update();
		}

		protected function FloorContact()
		{

		}

		protected function Update()
		{

		}
	}

}